<!-- LEFT -->
<script src="../media/system/js/mootools-core.js" type="text/javascript"></script>
<script src="../media/system/js/core.js" type="text/javascript"></script>
<form action="index.php?top=page&option=com_frleader" method="post" name="adminForm" id="adminForm" class="adminform">
 <?php echo $this->loadTemplate('search','default') ?>
 <!-- END LEFT -->

 <!-- CONTENT -->
 <div id="jm-content">
    <div id="">     
     <h3 class="h_title">
        <label class="jm_name">指導者</label>
        <span class="right"><label class="jm_name">更新日:<?php if($this->rows->COCH_DATE!='0000-00-00 00:00:00') echo HelperBG::F_GetDate_JP($this->rows->COCH_DATE); ?></label>
            <button onClick="Joomla.submitbutton('default');">一覧戻る</button>
        </span>
    </h3>     
    <div class="info-basic">                             
        <div>
            <table width="100%" border=0  cellspacing="0" cellpadding="0" id="tb_data">
                <tbody>
                    <?php
                    $aut=new bgAuthorize();
                            //check group user 
                    $group=$aut->getUserGroup();
                            //check ocba
                    $ocba = $aut->getOCBA_CODE();
                             //echo $group;
                                //echo $ocba;
                             //echo $this->rows->COCH_OCBA_CODE;
                    ?>
                    <tr style="visibility:hidden">
                        <td style="width: 120px;"></td>
                        <td style="width: 205px;"></td>
                        <td style="width: 190px;"></td>
                        <td style="width: 100px;"></td>
                        <td style="width: 140px;"></td>
                    </tr>
                    <tr>                                        
                        <td><label class="title_">基本データ</label></td>
                        <td>【指導員コード】</td>
                        <td><?php echo $this->rows->COCH_CD ?></td>                                
                        <td rowspan="5" colspan="2" style="vertical-align: top;text-align: right;">
                           <img style="width: 45%;" src="<?php if($this->rows->COCH_IMG != null) { echo 'uploads/images/com_info_leader/'.$this->rows->COCH_IMG ;} else { echo 'uploads/images/com_info_leader/nopicture_coach.gif' ; } ?> "/>                                   
                       </td>                                                     
                   </tr>
                   <tr>                                        
                    <td ></td>
                    <td >【指導者システムコード】</td>
                    <td ><?php echo $this->rows->COCH_CODE ?></td>
                    <!-- <td ></td> -->

                </tr>
                <tr>                                        
                    <td ></td>
                    <td >【氏名】</td>
                    <td ><?php echo $this->rows->COCH_NAME ?></td>
                    <!-- <td ></td> -->

                </tr>
                <tr>   
                    <td ></td>
                    <td >【カナ名】</td>
                    <td ><?php echo $this->rows->COCH_KANA ?></td></td>
                    <!-- <td ></td> -->

                </tr>
                <tr>                                        
                    <td></td>
                    <td >【所属センター名】</td>
                    <td><?php echo $this->rows->OCBA_NAME ?></td>
                    <!-- <td>

                    </td> -->

                </tr>
                <tr>                                        
                    <td></td>
                    <td>【性別】</td>
                    <td><?php  if ($this->rows->COCH_SEX==1){ echo "男性"; }else{ echo "女性";} ?></td>
                    <td></td>
                </tr>
                <?php
                if ($group==9 || $group==8 || ($ocba==$this->rows->COCH_OCBA_CODE && $group==11))
                {

                    ?>
                    <tr>                                        
                        <td></td>
                        <td>【生年月日】</td>
                        <td>
                            <?php  if($this->rows->COCH_BDATE!='0000-00-00 00:00:00') echo HelperBG::F_GetDate_JP($this->rows->COCH_BDATE); ?>
                        </td>
                        <td></td>
                    </tr>
                    <?php } ?>

                     <?php
                        if ($group==9 || $group==8 || ($ocba==$this->rows->COCH_OCBA_CODE && $group==11))
                        {
                    ?>
                    <tr>                                        
                        <td></td>
                                <!--<td  style="vertical-align: top;">【所属部署】</td>
                                <td ><?php echo $this->rows->COCH_UNIT ?></td>-->
                                  <td>【職業】</td>
                                  <td><?php echo $this->rows->JOBM_NAME;?></td>
                                 
                              <td ></td>
                          </tr>
                           <?php
                              }
                              ?>

                          <?php
                          if ($group==8 || $group==9 || ($ocba==$this->rows->COCH_OCBA_CODE && $group==11))
                          {
                            ?>

                            <tr>                                        
                                <td></td>
                                <td>【登録年月日】</td>
                                <td>
                                    <?php  if($this->rows->COCH_RDATE!='0000-00-00 00:00:00') echo HelperBG::F_GetDate_JP($this->rows->COCH_RDATE); ?>
                                </td>
                                <td  colspan="2">【更新年月日】 

                                    <?php  if($this->rows->COCH_MDATE!='0000-00-00 00:00:00') echo HelperBG::F_GetDate_JP($this->rows->COCH_MDATE); ?>
                                </td>
                                <!-- <td >
                                    
                                </td> -->
                            </tr>
                            
                            <tr>                                        
                                <td></td>
                                <td>【有効期限年月日】</td>
                                <td>
                                    <?php  if($this->rows->COCH_LDATE!='0000-00-00 00:00:00') echo HelperBG::F_GetDate_JP($this->rows->COCH_LDATE); ?>
                                </td>
                                <?php if($group != 11) { ?>
                                <td  colspan="2">【抹消年月日】 

                                    <?php  if($this->rows->COCH_EDATE!='0000-00-00 00:00:00') echo HelperBG::F_GetDate_JP($this->rows->COCH_EDATE); ?>
                                </td>
                                <?php } else { ?>
                                <td  colspan="2">
                                    
                                </td>
                                <?php } ?>
                            </tr>
                            <?php if($group != 11){ ?>
                            <tr>                                        
                                <td ></td>
                                <td >【抹消処理年月日】</td>
                                <td >

                                    <?php  if($this->rows->COCH_DDATE!='0000-00-00 00:00:00') echo HelperBG::F_GetDate_JP($this->rows->COCH_DDATE); ?>
                                </td>
                                <td></td>
                            </tr>
                            <?php } ?>
                            <tr>

                                <td colspan="5"><hr /></td>
                            </tr>
                            <?php } ?>
                        </tbody>
                    </table>
                    <table width="100%" cellpadding="0" cellspacing="0" border=0>
                        <tbody>
                            <?php
                            if($group==9 || $group==8 || ($ocba==$this->rows->COCH_OCBA_CODE && $group==11))
                            {
                                ?>
                               <tr style="visibility:hidden">
                                    <td style="width: 120px;"></td>
                                    <td style="width: 300px;"></td>
                                    <td style="width: 190px;"></td>
                                    <td style="width: 100px;"></td>
                                    <td style="width: 140px;"></td>
                                </tr>
                  
                                <tr>
                                    <td><label class="title_">自宅</label></td>
                                    <td >【郵便番号】</td>
                                    <td ><?php echo $this->rows->COCH_POST; ?></td>
                                    <td  colspan="2">【都道府県】 
                                        <?php 
                                        $model = $this->getModel();
                                        $pref1=$model->getNamePref($this->rows->COCH_PRE1);
                                        echo $pref1;
                                        ?>
                                    </td>
                                    <!-- <td >
                                        
                                    </td> -->
                                </tr>
                                <tr>
                                    <td><label class="title_"></label></td>
                                    <td>【住所】</td>
                                    <td colspan="3"><?php echo $this->rows->COCH_ADD1; ?></td>

                                </tr>
                                <tr>
                                    <td><label class="title_"></label></td>
                                    <td>【マンション・ビル名】</td>
                                    <td colspan="3"><?php echo $this->rows->COCH_BUI1; ?></td>

                                </tr>
                                <tr>
                                    <td><label class="title_"></label></td>

                                    <td >【自宅電話番号】</td>
                                    <td ><?php echo $this->rows->COCH_TEL; ?></td>
                                    <td  colspan="3">【自宅FAX】 
                                        <?php echo $this->rows->COCH_FAX; ?>
                                    </td>
                                    <!-- <td ></td> -->

                                </tr>
                                <tr>
                                    <td><label class="title_"></label></td>

                                    <td >【自宅メールアドレス】</td>
                                    <td ><?php echo $this->rows->COCH_MAIL; ?></td>
                                    <td  colspan="3">【メールマガジン登録】

                                        <?php 
                                        if($this->rows->COCH_MAIL != null){
                                            if($this->rows->COCH_MAIF==1 && $this->rows->COCH_MAIL!=null) {
                                                echo '登録済み';
                                            } 
                                            else echo '登録なし'; 
                                        }  
                                        ?>
                                    </td>
                                    <!-- <td >
                                        
                                    </td> -->
                                </tr>
                                <tr>
                                    <td><label class="title_"></label></td>
                                    <td>【携帯メールアドレス】</td>
                                    <td><?php echo $this->rows->COCH_MAIK; ?></td>
                                    <td colspan="2">【携帯メールマガジン登録】
                                        <?php if($this->rows->COCH_MAIK != null){
                                            if($this->rows->COCH_MAKF==1 && $this->rows->COCH_MAKF!=null) {
                                                echo '登録済み';
                                            } 
                                            else echo '登録なし';
                                        }  ?>
                                    </td>
                                </tr>    

                                <tr>
                                    <td colspan="5"><hr /></td>
                                </tr>
                                <?php } ?>
                                <?php
                                if ($group==8 || $group==9 || ($ocba==$this->rows->COCH_OCBA_CODE && $group==11))
                                {
                                    ?>
                                    <tr>
                                        <td><label class="title_">勤務先</label></td>
                                        <td>【勤務先名】</td>
                                        <td><?php echo $this->rows->COCH_NAMW; ?></td>
                                        <td colspan="2">【所属部署】 <?php echo $this->rows->COCH_UNIT; ?></td>

                                    </tr>
                                    <tr>
                                        <td><label class="title_"></label></td>
                                        <td>【役職】</td>
                                        <td><?php echo $this->rows->COCH_POSI; ?></td>
                                        <td></td>
                                        <td></td>
                                    </tr>
                                    <tr>
                                        <td><label class="title_"></label></td>

                                        <td >【郵便番号】</td>
                                        <td ><?php echo $this->rows->COCH_POSW; ?></td>
                                        <td  colspan="2">【都道府県】 

                                            <?php 
                                            $model = $this->getModel();
                                            $pref2 = $model->getNamePref($this->rows->COCH_PRE2);
                                            echo $pref2;
                                            ?>
                                        </td>
                                        <!-- <td >
                                            
                                        </td> -->
                                    </tr>
                                    <tr>
                                        <td><label class="title_"></label></td>
                                        <td>【勤務先住所】</td>
                                        <td colspan="3"><?php echo $this->rows->COCH_ADD2; ?></td>

                                    </tr>
                                    <tr>
                                        <td><label class="title_"></label></td>
                                        <td>【マンション・ビル名】</td>
                                        <td colspan="3"><?php echo $this->rows->COCH_BUI2; ?></td>
                                    </tr>
                                    <tr>
                                        <td><label class="title_"></label></td>

                                        <td >【勤務先電話番号】</td>
                                        <td ><?php echo $this->rows->COCH_TELW; ?></td>
                                        <td  colspan="2">【勤務先FAX】 
                                            <?php echo $this->rows->COCH_FAXW; ?>
                                        </td>
                                        <!-- <td ></td> -->

                                    </tr>
                                    <tr>
                                        <td><label class="title_"></label></td>
                                        <td>【勤務先メールアドレス】</td>
                                        <td><?php echo $this->rows->COCH_MAIW; ?></td>
                                        <td colspan="2">【勤務先メールマガジン登録】<?php if($this->rows->COCH_MAFW==1 && $this->rows->COCH_MAIW!=null) {echo '登録済み';} else echo '登録なし';  ?></td>

                                    </tr>
                                    <?php } ?>
                                    <tr>

                                        <td>

                                        </td>
                                        <td>【勤務形態】</td>
                                        <td>
                                            <?php if($this->rows->COCH_WOKF == 1) echo '<font size="2" face="ＭＳ Ｐゴシック, Osaka" class="font03">■常勤</font>'; else echo '<font size="2" face="ＭＳ Ｐゴシック, Osaka" class="font03">■非常勤</font>';?>
                                        </td>
                                        <td></td>
                                        <td></td>
                                    </tr>

                                    <tr>                    
                                        <td colspan="5"><hr /></td>
                                    </tr>

                                    <tr>

                                        <td style="width: 3%;vertical-align:top;"><label class="title_">資格</label></td>

                                        <td colspan="4">

                                            <table style="width: 99%;" id="tb_blue">

                                                <tr>
                                                    <!--<th>コード</th>-->
                                                    <th>指導者種別</th>
                                                    <!--<th>財団職員</th>-->
                                                    <th>研修区分</th>
                                                    <th>研修場所</th>
                                                    <th>研修回</th>
                                            <!--<th>判定日</th>
                                            <th>旧資格</th>
                                            <th>備考</th>-->
                                        </tr>
                                        <?php 
                                        //$colis = $this->colis;
                                        
                                        if($this->colis != null){
                                            foreach($this->colis as $k=>$coli){ 
                                                //echo $coli;
                                                ?> 
                                                <tr>
                                                    <!--<td><?php echo $coli->COLI_CODE; ?></td>-->
                                                    <td><?php echo $coli->COCM_NAME; ?></td>     
                                                    <td>
                                                        <?php if( $coli->COLI_COTF == 0) echo '財団職員による養成'; else echo'地域センターによる養成';  ?>
                                                    </td> 
                                                    <td><?php echo $coli->OCBA_NAME; ?></td>                                             
                                                    <td><?php echo $coli->COLI_TERM; ?>
                                                        <?php if($coli->COLI_UNIT == 1) echo '回';
                                                        else if  ($coli->COLI_UNIT == 2) echo '期';
                                                        else if  ($coli->COLI_UNIT == 3) echo '年度';
                                                        ?>
                                                    </td>
                                            <!--<td>            
                                            <?php  if($coli->COLI_JDATE!='0000-00-00 00:00:00') echo HelperBG::F_GetDate_JP($coli->COLI_JDATE); ?></td>
                                            <td><?php if($coli->COLI_OLDF==1) echo 'あり'; else echo 'なし'; ?></td>
                                            <td><?php echo $coli->COLI_NOTE; ?></td>-->
                                        </tr>
                                        <?php
                                    }
                                }else{
                                    ?>
                                    <tr>
                                        <td class="center" colspan="9">データは見つかりませんでした</td>
                                    </tr>
                                    <?php    
                                }
                                ?>

                            </table>
                        </td>
                    </tr>



                    <tr>
                        <td style="width: 3%;vertical-align:top;">
                            <label class="title_"></label>

                        </td>

                        <td>【人材バンク】</td>
                        <?php

                        $ar=explode(',',$this->rows->COCH_HUMAN_CODE_LIST);
                        $i=0;
                        $j=count($this->human);
                        foreach ($this->human as $k=>$value)
                        {
                            $str='<font size="2" face="ＭＳ Ｐゴシック, Osaka" class="font03">□</font>';
                            $i++;
                            $j--;
                            ?>
                            <td style="width: 22%;">
                                <?php foreach ($ar as $k=>$vl)
                                {
                                    if ($value->HUMAN_CODE==$vl)
                                    {
                                        $str='<font size="2" face="ＭＳ Ｐゴシック, Osaka" class="font03">■</font>';
                                        break;
                                    }
                                }
                                ?>

                                <?php echo $str.$value->HUMAN_NAME; $str='<font size="2" face="ＭＳ Ｐゴシック, Osaka" class="font03">□</font>' ?>
                                <?php
                                if ($i == 2 && $j >0)
                                {
                                    $i=0;
                                    echo "</td></tr><tr><td></td><td>";
                                } 
                                ?>
                            </td>  
                            <?php } ?>  
                            
                            
                            

                        </tr>

                        <tr>
                            <td><label class="title_"></label></td>
                            <td>【指導者会】</td>
                            <td>
                             <?php if($this->rows->COCH_REGI == 1) echo '<font size="2" face="ＭＳ Ｐゴシック, Osaka" class="font03">■</font>'; else echo '<font size="2" face="ＭＳ Ｐゴシック, Osaka" class="font03">□</font>';?>登録
                         </td>

                     </tr>
                     <tr>
                        <td><label class="title_"></label></td>
                        <td>【指導者会名】</td>
                        <td colspan="3"><?php echo $this->rows->COCH_LDME; ?></td>

                    </tr>

                    <tr>
                        <td></td>
                        <td>【事業協力】</td>
                        <!-- Hien thi cac checkbox lien ket dao tao  -->
                        <?php

                        $i = 0;
                        $j=count($this->lkdt);
                        foreach($this->lkdt as $key=>$value){
                            $str='<font size="2" face="ＭＳ Ｐゴシック, Osaka" class="font03">□</font>';
                            $i++;
                            $j--;
                            ?>
                            <td>

                                <?php if(($this->rows->COCH_LKDT_CODE_LIST)!= null){
                                    $ar=explode(',',$this->rows->COCH_LKDT_CODE_LIST);
                                    foreach ($ar as $vl)
                                    {
                                       if($value->LKDT_CODE == $vl)
                                       {
                                        $str='<font size="2" face="ＭＳ Ｐゴシック, Osaka" class="font03">■</font>'; 
                                    }
                                } 
                            }
                            ?>


                            <?php echo $str.$value->LKDT_NAME;$str='<font size="2" face="ＭＳ Ｐゴシック, Osaka" class="font03">□</font>'; ?>
                        </td>
                        <?php
                        if($i==3 && $j >0){
                            $i = 0;
                            echo "</tr><tr><td><label class='title_'></label</td><td class='tb_4c'></td>"; 
                        }    
                    }
                    ?>

                </tr>

                <!-- -->
                <?php
                if($group==8 || $group==9 || ($ocba==$this->rows->COCH_OCBA_CODE && $group==11))
                { 
                    ?>
                    <tr>
                        <td><label class="title_"></label></td>
                        <td>【B&G事業担当】</td>
                        <td>自:<?php if($this->rows->COCH_BUSS1!='0000-00-00 00:00:00' && $this->rows->COCH_BUSS1 != null) echo HelperBG::F_GetDate_JP($this->rows->COCH_BUSS1); ?></td>
                        <td>至:<?php if($this->rows->COCH_BUSE1!='0000-00-00 00:00:00' && $this->rows->COCH_BUSE1 != null) echo HelperBG::F_GetDate_JP($this->rows->COCH_BUSE1); ?></td>
                    </tr>
                    <tr>
                        <td><label class="title_"></label></td>
                        <td></td>
                        <td>自:<?php  if($this->rows->COCH_BUSS2!='0000-00-00 00:00:00' && $this->rows->COCH_BUSS2 != null) echo HelperBG::F_GetDate_JP($this->rows->COCH_BUSS2); ?></td>
                        <td>至:<?php if($this->rows->COCH_BUSE2!='0000-00-00 00:00:00' && $this->rows->COCH_BUSE2 != null) echo HelperBG::F_GetDate_JP($this->rows->COCH_BUSE2); ?></td>
                    </tr>
                    <tr>
                        <td><label class="title_"></label></td>
                        <td></td>
                        <td>自:<?php if($this->rows->COCH_BUSS3!='0000-00-00 00:00:00' && $this->rows->COCH_BUSS3 != null)  echo HelperBG::F_GetDate_JP($this->rows->COCH_BUSS3); ?></td>
                        <td>至:<?php if($this->rows->COCH_BUSE3!='0000-00-00 00:00:00' && $this->rows->COCH_BUSE3 != null) echo HelperBG::F_GetDate_JP($this->rows->COCH_BUSE3); ?></td>
                        <tr>
                            <td><label class="title_"></label></td>
                            <td></td>
                            <td>自:<?php if($this->rows->COCH_BUSS4!='0000-00-00 00:00:00' && $this->rows->COCH_BUSS4 != null) echo HelperBG::F_GetDate_JP($this->rows->COCH_BUSS4); ?></td>
                            <td>至:<?php if($this->rows->COCH_BUSE4!='0000-00-00 00:00:00' && $this->rows->COCH_BUSE4 != null) echo HelperBG::F_GetDate_JP($this->rows->COCH_BUSE4); ?></td>
                        </tr>
                        <tr>
                            <td><label class="title_"></label></td>
                            <td></td>
                            <td>自:<?php if($this->rows->COCH_BUSS5!='0000-00-00 00:00:00' && $this->rows->COCH_BUSS5 != null) echo HelperBG::F_GetDate_JP($this->rows->COCH_BUSS5); ?></td>
                            <td>至:<?php  if($this->rows->COCH_BUSE5!='0000-00-00 00:00:00' && $this->rows->COCH_BUSE5 != null) echo HelperBG::F_GetDate_JP($this->rows->COCH_BUSE5); ?></td>
                        </tr>
                        <tr>
                            <td><label class="title_"></label></td>
                            <td></td>
                            <td>自:<?php if($this->rows->COCH_BUSS6!='0000-00-00 00:00:00' && $this->rows->COCH_BUSS6 != null) echo HelperBG::F_GetDate_JP($this->rows->COCH_BUSS6); ?></td>
                            <td>至:<?php if($this->rows->COCH_BUSE6!='0000-00-00 00:00:00' && $this->rows->COCH_BUSE6 != null) echo HelperBG::F_GetDate_JP($this->rows->COCH_BUSE6); ?></td>
                        </tr>
                        <?php } ?>





                    </tbody>
                </table>
                <table border=0>
                    <tbody>                           
                        <tr><td colspan="5"><hr /></td></tr>
                        <tr style="visibility:hidden">
                                    <td style="width: 120px;"></td>
                                    <td style="width: 168px;"></td>
                                    <td style="width: 190px;"></td>
                                    <td style="width: 158px;"></td>
                                    <td style="width: 84px;"></td>
                                </tr>
                        <tr>
                            <td><label class="title_">その他</label></td>
                            <td>【登録日】</td>
                            <td >登録日：<?php if($this->rows->COCH_RDATE != '0000-00-00 00:00:00') echo HelperBG::F_GetDate_JP($this->rows->COCH_RDATE); ?></td>
                            <td >更新日：<?php if($this->rows->COCH_MDATE != '0000-00-00 00:00:00') echo HelperBG::F_GetDate_JP($this->rows->COCH_MDATE); ?></td>
                            <td ></td>

                        </tr>

                        <tr>
                            <td><label class="title_"></label></td>
                            <td style="vertical-align: top;">【特記事項】</td>
                            <td colspan="3"><?php echo $this->rows->COCH_COMM; ?></td>

                        </tr>
                        <?php
                        if($group==8 || $group==9)
                        {
                            ?>
                            <tr>
                                <td><label class="title_"></label></td>
                                <td style="vertical-align: top;">【備考】</td>
                                <td colspan="3"><?php echo $this->rows->COCH_NOTE; ?></td>

                            </tr>
                            <?php } ?>
                        </tbody>
                    </table>
                    <input type="hidden" name="task" value=""/>
                    <input type="hidden" name="limitstart" value="<?php echo JRequest::getVar('limitstart'); ?>">
                </div>
            </div>                               

        </div>

    </div>
    <!-- END CONTENT -->
</form>        
